﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;

namespace DBLibrary.Model.pojo
{
    public class AreaConfig : INotifyPropertyChanged //区域信息配置表
    {
        public event PropertyChangedEventHandler PropertyChanged = delegate { };
        private int    _ID;                       //[ID]
        private string _AreaName;                   //[区域名称]
        private string _AreaType;                   //[区域类型]
        private string _AreaDescription;            //[区域描述]
        private DateTime _CreationTime;             //[创建时间]
        private string _AreaFileName;               //[区域文件名称]
        private string displayName;                 //自定义显示

        [DisplayName("序号")]
        public int  ID
        {
            get => _ID;
            set
            {
                _ID = value; 
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("ID"));
                }
            }
        }
        [DisplayName("区域名称")]
        public string AreaName
        {
            get => _AreaName;
            set
            {
                _AreaName = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("AreaName"));
                }
            }
        }
        [DisplayName("区域类型")]
        public string AreaType
        {
            get => _AreaType;
            set
            {
                _AreaType = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("AreaType"));
                }
            }
        }
        [DisplayName("区域描述")]
        public string AreaDescription
        {
            get => _AreaDescription;
            set
            {
                _AreaDescription = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs(" AreaDescription"));
                }
            }
        }
        [DisplayName("区域文件名称")]
        public string AreaFileName
        {
            get => _AreaFileName;
            set
            {
                _AreaFileName = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs(" AreaFileName"));
                }
            }
        }
        [DisplayName("创建时间")]
        public DateTime CreationTime
        {
            get => _CreationTime;
            set
            {
                _CreationTime = value;
                if (PropertyChanged != null)
                {
                    PropertyChanged.Invoke(this, new PropertyChangedEventArgs("CreationTime"));
                }
            }
        }
    }

}
